<template>
    <div>
        <el-breadcrumb separator="/">
            <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item  v-for="(item,index) in list" :key="index">
                {{item.meta.title}}
            </el-breadcrumb-item>
        </el-breadcrumb>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                list: []
            }

        },
        mounted() {
            this.list = this.$route.matched;
        },
        watch: {
            $route(to, from) {
                console.log(to)
                let matched = to.matched
                this.list = matched
            }
        }
        ,
        methods: {}
    }
</script>

<style lang="less" scoped>

</style>